<?php echo $this->render("header.phtml"); ?>
<label class="title">Member control - edit pending member</label>
<div class="horiz_sep">&nbsp;</div>
<?php 
	$user = (object) $this->user;
	 if (isset($this->errors)){
		$errors = $this->errors;		
		if (key_exists("fullname_null", $errors)) $fullname_null = $errors['fullname_null'];
		else $fullname_null = "";
		if (key_exists("email_incorrect", $errors)) $email_incorrect = $errors['email_incorrect'];
		else $email_incorrect = "";
	} 
	$utilities = $this->utilities;
?>

<form action="<? echo $this -> baseUrl ?>/<?= $this->contextPath ?>/edit-pending" method="post">
<input type="hidden" name="page" value="<?= $this->page; ?>"/>
<input type="hidden" name="user_id" value="<?= $user->usr_id; ?>"/>
<input type="hidden" name="usr_mobile" value="<?= $user->usr_mobile; ?>"/>
	<table cellpadding="0" cellspacing="5" width="100%">
		<tr>	
			<td width="20%" align="right">
				<b>So dien thoai:</b> 
			</td>
			<td>
				<b><?php echo $user->usr_mobile; ?></b>
			</td>
		</tr>
		<tr>
			<td align="right">
				<b>Ho va ten:</b>
			</td>
			<td>
				<input maxlength="50" type="text" name="usr_fullname" value="<?php echo $user->usr_fullname; ?>" style="padding:2px;"/> <font color="red" style="font-weight:bold;">*</font>
				<?php if (isset($fullname_null)){ ?>
					<span style="color:red; font-weight:bold;"><?php echo $fullname_null; ?></span>
				<?php } ?>
			</td>
		</tr>
		<tr>
			<td align="right">
				<b>Ngay sinh</b> 
			</td>
			<td>
				<input maxlength="10" type="text" name="usr_birthday" value="<?php echo $utilities->formatdate($user->usr_birthday); ?>" style="padding:2px;"/>
			</td>
		</tr>
		<tr>
			<td align="right">
				<b>Dia chi email:</b>
			</td>
			<td>
				<input maxlength="100" type="text" name="usr_email" value="<?php echo $user->usr_email; ?>" style="padding:2px;"/>
				<?php if (isset($email_incorrect)){ ?>
					<span style="color:red; font-weight:bold;"><?php echo $email_incorrect; ?></span>
				<?php } ?>
				(ex: example@gmail.com)
			</td>
		</tr>	
		<tr>
			<td align="right">
				<b>Vi tien:</b>
			</td>
			<td>
				<input maxlength="12" type="text" name="usr_coin_amount" value="<?php echo $user->usr_coin_amount; ?>" style="padding:2px;"/> (VND)
			</td>
		</tr>	
		<tr>
			<td align="right">
				<b>Activated:</b>
			</td>
			<td>
				<input type="checkbox" name="usr_activated" value="1"/>
			</td>
		</tr>
		<tr>
			<td/>
			<td>
				<input type="submit" name="save" value="Save" />
			</td>
		</tr>
	</table>
</form>
<?php echo $this->render("footer.phtml"); ?>